package com.knowledge.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
        import com.knowledge.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.knowledge.business.mapper.TPushQuestionMapper;
import com.knowledge.business.domain.TPushQuestion;
import com.knowledge.business.service.ITPushQuestionService;

/**
 * 推送问题Service业务层处理
 *
 * @author zhaoyk
 * @date 2025-11-24
 */
@Service
public class TPushQuestionServiceImpl extends ServiceImpl<TPushQuestionMapper,TPushQuestion>  implements ITPushQuestionService
{
    @Autowired
    private TPushQuestionMapper tPushQuestionMapper;

    /**
     * 查询推送问题
     *
     * @param id 推送问题主键
     * @return 推送问题
     */
    @Override
    public TPushQuestion selectTPushQuestionById(String id)
    {
        return tPushQuestionMapper.selectTPushQuestionById(id);
    }

    /**
     * 查询推送问题列表
     *
     * @param tPushQuestion 推送问题
     * @return 推送问题
     */
    @Override
    public List<TPushQuestion> selectTPushQuestionList(TPushQuestion tPushQuestion)
    {
        return tPushQuestionMapper.selectTPushQuestionList(tPushQuestion);
    }

    /**
     * 新增推送问题
     *
     * @param tPushQuestion 推送问题
     * @return 结果
     */
    @Override
    public int insertTPushQuestion(TPushQuestion tPushQuestion)
    {
                tPushQuestion.setCreateTime(DateUtils.getNowDate());
            return tPushQuestionMapper.insertTPushQuestion(tPushQuestion);
    }

    /**
     * 修改推送问题
     *
     * @param tPushQuestion 推送问题
     * @return 结果
     */
    @Override
    public int updateTPushQuestion(TPushQuestion tPushQuestion)
    {
                tPushQuestion.setUpdateTime(DateUtils.getNowDate());
        return tPushQuestionMapper.updateTPushQuestion(tPushQuestion);
    }

    /**
     * 批量删除推送问题
     *
     * @param ids 需要删除的推送问题主键
     * @return 结果
     */
    @Override
    public int deleteTPushQuestionByIds(String[] ids)
    {
        return tPushQuestionMapper.deleteTPushQuestionByIds(ids);
    }

    /**
     * 删除推送问题信息
     *
     * @param id 推送问题主键
     * @return 结果
     */
    @Override
    public int deleteTPushQuestionById(String id)
    {
        return tPushQuestionMapper.deleteTPushQuestionById(id);
    }
}
